
export default {
    data() {
        return {
            dropdownActive: false,

            subMenu: "", // 新增subMenu属性
            welcomeVisible: true, // 新增 welcomeVisible 属性
        };
    },

    computed: {
        loginUsername() {
            return localStorage.getItem("username");
        },
    },

    methods: {
        toggleUserOptions(event) {
            event.stopPropagation();
            this.dropdownActive = !this.dropdownActive;
        },

        handleLogout() {
            // Your logout logic here
            this.$router.push({name: "Login"});
        },
        //打开子导航
        toggleSubMenu(menu) {
            this.subMenu = this.subMenu === menu ? "" : menu;
        },


    }
}